package net.chrone.quickpayapi.util;

import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
import java.util.ResourceBundle;

public class Constant {
	
	//平台公钥
	public static final String PUBLIC_KEY = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxzVuaVK+Xh4LmS+qVPppK7cbKBuQUbmWcbjSYKWxf/wkmP3umNQE6neu4Lswy1JBh0Joo/piYkeTialZc/VYWaXSUbFMAaoAHf0zWYXpBeU6H6VKxlJVCqyyhrM3j6hySnRp2BeaRKsZtE73MwnAOCbx3sWPkWTgfrXkM7ShLbVaBHGmmrHzzZuibaERajGisCBK3o1yMW6j8nu84KKISygF6ZBDCaSzIoA0W4PjwnpxXWbt4plu7YIu3tFikzuCQHd28FRqoEtS5ht+MiEjJhFwUZwDeCCjFiEaFgowjqbh5q+f9CfhFbVlble1qYMoKjysRcUhK0LpwLztXUooRQIDAQAB";
	//平台私钥
	public static final String PRIVATE_KEY = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDHNW5pUr5eHguZL6pU+mkrtxsoG5BRuZZxuNJgpbF//CSY/e6Y1ATqd67guzDLUkGHQmij+mJiR5OJqVlz9VhZpdJRsUwBqgAd/TNZhekF5TofpUrGUlUKrLKGszePqHJKdGnYF5pEqxm0TvczCcA4JvHexY+RZOB+teQztKEttVoEcaaasfPNm6JtoRFqMaKwIErejXIxbqPye7zgoohLKAXpkEMJpLMigDRbg+PCenFdZu3imW7tgi7e0WKTO4JAd3bwVGqgS1LmG34yISMmEXBRnAN4IKMWIRoWCjCOpuHmr5/0J+EVtWVuV7WpgygqPKxFxSErQunAvO1dSihFAgMBAAECggEABSiECGQlG8jJYhkS3wpw6LngESTNkuAsXht8DxabRwYfaHrCz+BFlFCvDZCrTch+e+MjVIOqQoM59cmV0GPc+s1JaeYeYrilMiGZT8sg4o8x9xnPmt0M6K7aHJTNboHdG8Jx7y+FRhvsGXgl/INXH90aTDtvYUNscLuDAje+KLHK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String, String> errorCodeMap = new HashMap<String, String>();

	public static Map<String, String> getErrorCodeMap() {
		return errorCodeMap;
	}

	static {
		// 加载错误码
		ResourceBundle resources = ResourceBundle.getBundle("errorCodes");
		Enumeration<String> keys = resources.getKeys();
		while (keys.hasMoreElements()) {
			String key = keys.nextElement();
			errorCodeMap.put(key, resources.getString(key));
		}
	}
	
	//***************默认费率*****************/
	public static double DEFAULT_FEE_RATE = 0.006d;
	
	//***************订单状态*****************/
	public static int PAY_ST_NEW = 1;//待支付
		
	public static int PAY_ST_PAID_SUCCESS = 2;//支付成功
	
	public static int PAY_ST_PAID_FAIL = 3;//支付失败
	
	public static int PAY_ST_CLOSED = 4;//已关闭
	
	//***************订单状态*****************/
	public static int PAYFOR_ST_NEW = 0;//未付款
			
	public static int PAYFOR_ST_PAING = 1;//付款中
		
	public static int PAYFOR_ST_PAID_SUCCESS = 2;//付款成功
		
	public static int PAYFOR_ST_FAIL = 3;//付款失败
	
	//***************商户状态*****************/
	public static int MCHNT_ST_UNREGIST = 0;//未注册
	
	public static int MCHNT_ST_NONE_KEY = 1;//已注册未下载密钥
	
	public static int MCHNT_ST_UNVALID_CARD = 2;//已下载密钥未验卡
	
	public static int MCHNT_ST_AUDIT_PASS = 3;//验卡成功
	
	//***************支付类型*****************/
	public static int CHNL_TP_WECHAT = 0;//微信公众号
	
	public static int CHNL_TP_ALIPAY = 1;//支付宝
	
	//***************支付通道代码************/
	
	public static String CHNL_CODE_CITIC = "citic";//中信
	
	//***************付款业务类型************/
	public static int PAYFOR_TP_D0 = 0;//D0代发
	
	public static int PAYFOR_TP_WITHDRAW = 1;//余额提现
	
	//***************二维码类型************/
	public static int QRCODE_0 = 0;//非固定码
	
	public static int QRCODE_1 = 1;//固定码
	
	//***************交易类型************/
	public static int TRAN_TP_0 = 0;//t0交易
		
	public static int TRAN_TP_1 = 1;//t1交易
}
